package main

import (
	"kaoqin"
	"logger"
	"panda"
	"time"
)

// var logger = log.New(os.Stdout, "", log.Ldate|log.Ltime|log.Lshortfile)
var log = logger.Log

func main() {

	// 运行当前目录下的所有panda脚本
	panda.RunNowDir()
	// 输出蓝色字体"Hello, 世界!"
	log.ColorBlue("Hello, 世界!")
	// 设置考勤图片路径
	kaoqin.ImagePath = "D:/Myother/mygo"
	dev := kaoqin.NewDevice()
	dev.Screen("screen.png")
	kaoqin.Mark("screen.png", "screen_marked.png")

	panda.TrackTime("screen open", func() { dev.ADBcmd("adb shell input keyevent 224") })
	// dev.ADBcmd("adb shell input keyevent 224")
	dev.Click(200, 200, 500*time.Millisecond, 1)
	dev.Screen("screen.png")
	// dev.Daka_dd(false, false)
	dev.Screen("screen.png")
	dev.Clear()

	log.Error("开始执行打卡程序......")
	kaoqin.Run()
}
